import { initOpenNextCloudflareForDev } from "@opennextjs/cloudflare";

initOpenNextCloudflareForDev();

/** @type {import('next').NextConfig} */
const nextConfig = {
	typescript: { ignoreBuildErrors: true },
	eslint: { ignoreDuringBuilds: true },
	experimental: {
		// Generate source map to validate the fix for opennextjs/opennextjs-cloudflare#341
		serverSourceMaps: true,
		instrumentationHook: true,
	},
	images: {
		remotePatterns: [
			{
				protocol: "https",
				hostname: "avatars.githubusercontent.com",
				pathname: "/u/248818",
			},
		],
		localPatterns: [
			{
				pathname: "/snipp/**",
				search: "?iscute=yes",
			},
		],
	},
};

export default nextConfig;
